<!DOCTYPE html>
<#assign secSelect = JspTaglibs["http://www.casic304.cn/secSelect"] />
<#assign fillDept=JspTaglibs["http://www.casic304.cn/fillDept"] />
<html>
<head>
    <meta charset="utf-8">
    <title>软件静态度量基本信息</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="${ctx}/layui/css/layui.css" media="all"/>
    <link rel="stylesheet" href="${ctx}/qbdmsStatic/iconfont/iconfont.css"/>
    <link rel="stylesheet" href="${ctx}/qbdmsStatic/style/qbdms.css">
    <script type="text/javascript">
        var __ctx = "${ctx}";
    </script>
    <#if isClose == 'true'>
        <style>
            .listBody .qbdms-bodyDiv{padding: 0 }
            body.qbdms-particulars .qbdms-bodyDiv div.layui-table-view-body{padding: 16px}
            .btnformItem{background: none}
        </style>
    </#if>
</head>
<body class="listBody qbdms-particulars" >
<div class="qbdms-bodyDiv">
    <div class="layui-table-view-body qbdms-add-view-body" >
        <#if isClose != 'true'><div class="qbdms-formTitle" >软件静态度量 <i class="qbdms-returnOn closeWindow">返回</i></div></#if>
        <form class="formPreview layui-form" requrl="${ctx}/qbdms/wQbdSoftwareSta/get" lay-filter="wQbdSoftwareStaDataForm">
            <input type="hidden" name="id" placeholder="请输入" autocomplete="off" class="layui-input "
                   maxlength="50" fieldname="id">

            <div class="" style="width: 100%;overflow-x: auto">
                <table class="tableExcel qbdms-zeroTable" width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tbody>
                    <tr id="tbxx">
                    </tr>

                    <tr>
                        <td class="qbdms-zeroTable-lable">报送单位<span style="color: red;">*</span></td>
                        <td name='filldept'></td>
                        <td class="qbdms-zeroTable-lable">软件名称<span style="color: red;">*</span></td>
                        <td name='softwareName'></td>
                        <td class="qbdms-zeroTable-lable">密级<span style="color: red;">*</span></td>
                        <td name=''>
                            <@secSelect.sec_select required=true data_src=1 name="secret"/>
                        </td>
                    </tr>
                    <tr>
                        <td class="qbdms-zeroTable-lable">统计期<span style="color: red;">*</span></td>
                        <td name='statisticalPeriod'></td>
                        <input lay-verify="required" type="hidden" name="statisticalPeriod" placeholder="请输入"
                               autocomplete="off" class="layui-input dateTimeFiled input-right time-init month" id="month"
                               maxlength="25" fieldname="statisticalPeriod">
                        <td class="qbdms-zeroTable-lable">软件规模<span style="color: red;">*</span></td>
                        <td name='softwareScale'></td>
                        <td class="qbdms-zeroTable-lable">注释行<span style="color: red;">*</span></td>
                        <td name='commentLine'></td>
                    </tr>
                    <tr>
                        <td class="qbdms-zeroTable-lable">模块总数<span style="color: red;">*</span></td>
                        <td name='modularTotal'></td>
                        <td class="qbdms-zeroTable-lable">模块的平均规模<span style="color: red;">*</span></td>
                        <td name='modularAverageScale'></td>
                        <td class="qbdms-zeroTable-lable">模块平均圈复杂度<span style="color: red;">*</span></td>
                        <td name='modularAverageCircle'></td>
                    </tr>
                    <tr>
                        <td class="qbdms-zeroTable-lable">模块最大圈复杂度<span style="color: red;">*</span></td>
                        <td name='modularMaxCircle'></td>
                        <td class="qbdms-zeroTable-lable">模块圈复杂度(%)≥10的比例<span style="color: red;">*</span></td>
                        <td name='modularCircleComplex10'></td>
                        <td class="qbdms-zeroTable-lable">模块圈复杂度(%)≥20的比例<span style="color: red;">*</span></td>
                        <td name='modularCircleComplex20'></td>
                    </tr>
                    <tr>
                        <td class="qbdms-zeroTable-lable">模块圈复杂度(%)≥40的比例<span style="color: red;">*</span></td>
                        <td name='modularCircleComplex40'></td>
                        <td class="qbdms-zeroTable-lable">软件需求功能点数<span style="color: red;">*</span></td>
                        <td name='softwareDemandFunctionNum'></td>
                        <td class="qbdms-zeroTable-lable">概要设计的程序模块数<span style="color: red;">*</span></td>
                        <td name='outlineDesignNum'></td>
                    </tr>
                    <tr>
                        <td class="qbdms-zeroTable-lable">详细设计的程序模块数<span style="color: red;">*</span></td>
                        <td colspan="5" name='detailedDesignNum'></td>
                    </tr>





                    </tbody>
                </table>

            </div>
            <div class="layui-hide">
                <input type="text" name="id" placeholder="请输入" autocomplete="off" class="layui-input "
                       maxlength="50" fieldname="id">
                <input type="text" name="fillman" placeholder="请输入"
                       autocomplete="off" class="layui-input " maxlength="50" fieldname="fillman">
                <input type="text" name="fillmanaccount" placeholder="请输入"
                       autocomplete="off" class="layui-input " maxlength="50" fieldname="fillmanaccount">
                <input type="text" name="filldept" placeholder="请输入"
                       autocomplete="off" class="layui-input " maxlength="50" fieldname="filldept">
                <input type="text" name="filldeptid" placeholder="请输入填写部门id"
                       autocomplete="off" class="layui-input " maxlength="50" fieldname="filldeptid">
                <input type="text" name="filldepthospital" placeholder="请输入"
                       autocomplete="off" class="layui-input " maxlength="50" fieldname="filldepthospital">
                <input type="text" name="filldepthospitalid" placeholder="请输入二级部门id"
                       autocomplete="off" class="layui-input " maxlength="50" fieldname="filldepthospitalid">
                <input type="text" name="filldate" placeholder="请输入"
                       autocomplete="off" class="layui-input " maxlength="50" fieldname="filldate">
                <input type="text" name="fMainunitid" placeholder="请输入主承担单位ID"
                       autocomplete="off" class="layui-input " maxlength="50" fieldname="fMainunitid">
                <input type="text" name="createTime" placeholder="请输入"
                       autocomplete="off" class="layui-input" maxlength="50"
                       fieldname="createTime">
                <input type="text" name="createBy" placeholder="请输入"
                       autocomplete="off" class="layui-input " maxlength="50" fieldname="createBy">
                <input type="text" name="updateTime" placeholder="请输入"
                       autocomplete="off" class="layui-input dateTimeFiled time-init" maxlength="50"
                       fieldname="updateTime">
                <input type="text" name="updateBy" placeholder="请输入"
                       autocomplete="off" class="layui-input " maxlength="50" fieldname="updateBy">
                <input type="text" name="tenantId" placeholder="请输入租户Id"
                       autocomplete="off" class="layui-input " maxlength="50" fieldname="tenantId">
                <input type="text" name="reportStatusTemp" placeholder="请输入"
                       autocomplete="off" class="layui-input " maxlength="50" fieldname="reportStatusTemp">
                <input type="text" name="reportStatus" placeholder="请输入"
                       autocomplete="off" class="layui-input " maxlength="50" fieldname="reportStatus">
                <input type="text" name="reportDate" placeholder="请输入"
                       autocomplete="off" class="layui-input " maxlength="50" fieldname="reportDate">
                <input type="text" name="reportReason" placeholder="请输入"
                       autocomplete="off" class="layui-input " maxlength="50" fieldname="reportReason">
                <input type="text" name="returnmsg" placeholder="请输入"
                       autocomplete="off" class="layui-input " maxlength="50" fieldname="returnmsg">
                <input type="text" name="fTechnology" placeholder="组织负责人code"
                       autocomplete="off" class="layui-input " maxlength="50" fieldname="returnmsg">
            </div>

            <#if isClose != 'true'>
                <div class="layui-form-item btnformItem">
                    <p>
                        <button type="reset" id="closeWindow"
                                class="closeWindow layui-btn layui-btn-sm btn-save qbdms-oneBtnLine">返回
                        </button>
                    </p>
                </div>
            </#if>
        </form>
    </div>
</div>


<script src="${ctx}/qbdmsStatic/public/configFile.js"></script>
<script src="${ctx}/layui/layui.js"></script>
<script>
    layui.config({
        base: serverPath.qbdmsPath + staticPath.qbdmsPath //静态资源所在路径
    }).extend({
        index: 'lib/index' //主入口模块
    }).use(['index','common','laydate','jquery', 'form','propsHandle'], function () {
        var laydate = layui.laydate;
        var $ = layui.jquery;
        var form = layui.form;
        var propsHandle = layui.propsHandle;
        var  defProps = {
                //viewMould: 'form/formDef/view/formDesign/moulds/', // 组件模块 存放文件 *****
                viewMould: 'moulds/', // 组件模块 存放文件 *****
                formAreaInfo: '.formPreview',
                formAreaInfo: 'html',
                temDate: '.temDate',
                uploadFileBtn: '.uploadFileBtn',
                uploadImgBtn: '.uploadImgBtn',
                richTextArea: '.richTextArea',
                selectInput: '.selectInput',
                radioOptionCont: '.radioOptionCont',
                dataLexiTree: '.dataLexiTree',
                selectorBtn: '.selectorBtn'
            },
            temQuery = new propsHandle();  // 实例化模板功能部分

        // 初始化模板功能
        temQuery.initTem({
            selectorBtn: defProps.selectorBtn,
            selectorTemPath: setter.views + defProps.viewMould
        });
        //关闭当前页面
        $("#closeWindow,.closeWindow").click(function () {
            if ("${isClose}" == "true") {
                parent.layer.close(parent.layer.getFrameIndex(window.name));
            }
            window.location.href =  '${ctx}/qbdms/wQbdSoftwareSta/view/list'+'${backHos}';
        });

        var runId = "${runId}";
        if(runId == null || runId == ''){
            $("#hideAndShow").show();
        }


        var common = layui.common;
        var index = parent.layer.getFrameIndex(window.name);

        //- 添加表单验证规则 开始 ---------------------------------------------------------------------
        form.verify({
            integer: [/^[+]{0,1}(\d+)$/,'请输入正整数'],
            money: [/^((0{1}\.\d{1,2})|([1-9]\d*\.{1}\d{1,2})|([1-9]+\d*))$/,'请输入合适金额'],
            length100:[/^.{0,100}$/,'输入字符数不能超过100'],
            length2000:[/^.{0,2000}$/,'输入字符数不能超过2000'],
            fileRequired:[/[\S]+/,"没有上传对应附件"],
        });

        var id = "${id}";
        //年月选择器
        laydate.render({
            elem: '#month'
            ,type: 'month'
        });

        if ('${dept}' != '') {
            $("input[name='filldept']").val('${dept}');
        }
        common.updateForm({
            name:'wQbdSoftwareStaDataForm',
            idValue:"${id}",
            primary:"id",
            beforeSubmitFun: function(data){
                var newD = data.field.statisticalPeriod;
                data.field.statisticalPeriod = new Date(newD);

            },
            getCallback: function(data) {
                // 填报信息
                $("#tbxx").html("<td class='qbdms-zeroTable-lable'>填报信息:</td><td colspan='5' class=''>【"+data.data.filldept+" | "
                    +data.data.fillman+"  | "+data.data.filldate+"】</td>");
            },
            updateCallback:function (data) {
                if (common.filterRecord(data)) {
                    if($(".privateSubmit")){
                        $(".privateSubmit").attr("disabled",false).css("pointer-events","auto");
                    }
                    layer.alert(publicMethods.confirmStyle(data.msg),{title: false,skin: 'confirm-class'}, function (index) {
                        layer.close(index);
                        window.location.href = serverPath.qbdmsPath + '/qbdms/wQbdSoftwareSta/view/list';
                    });
                } else {
                    layer.alert(publicMethods.confirmStyle(data.msg),{title: false,skin: 'confirm-class'});
                }
                return false;
            }
        });


        $("body *").not("#closeWindow").attr("disabled", "disabled");
    });


</script>
</body>
</html>